# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=nmh
pkgver=1.7.1
pkgrel=6
pkgdesc="nmh is a powerful electronic mail handling system"
url="https://nongnu.org/nmh/"
arch="all"
license="BSD-3-Clause"
makedepends="openssl1.1-compat-dev ncurses-dev gnutls-dev readline-dev gdbm-dev"
subpackages="$pkgname-doc"
source="https://download.savannah.nongnu.org/releases/nmh/nmh-$pkgver.tar.gz"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--host=$CHOST \
		--build=$CBUILD \
		--prefix=/usr \
		--with-readline \
		--with-tls \
		--sysconfdir=/etc/nmh
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
f2130243924174c9b965adbfdf1582a5caae2dc730e8731760b143c481e2174699f62ef0014218ec2698d1927cc94d1789f82823ee31d587602cc2c7d1d8918b  nmh-1.7.1.tar.gz
"
